<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This file documents the use of the GNU compilers.

Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>eBPF Options (Using the GNU Compiler Collection (GCC))</title>

<meta name="description" content="eBPF Options (Using the GNU Compiler Collection (GCC))">
<meta name="keywords" content="eBPF Options (Using the GNU Compiler Collection (GCC))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Indices.html" rel="index" title="Indices">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Submodel-Options.html" rel="up" title="Submodel Options">
<link href="FR30-Options.html" rel="next" title="FR30 Options">
<link href="DEC-Alpha-Options.html" rel="prev" title="DEC Alpha Options">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
kbd.key {font-style: normal}
span:hover a.copiable-link {visibility: visible}
ul.mark-minus {list-style-type: "\2212"}
-->
</style>


</head>

<body lang="en_US">
<div class="subsection-level-extent" id="eBPF-Options">
<div class="nav-panel">
<p>
Next: <a href="FR30-Options.html" accesskey="n" rel="next">FR30 Options</a>, Previous: <a href="DEC-Alpha-Options.html" accesskey="p" rel="prev">DEC Alpha Options</a>, Up: <a href="Submodel-Options.html" accesskey="u" rel="up">Machine-Dependent Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="eBPF-Options-1"><span>3.19.13 eBPF Options<a class="copiable-link" href="#eBPF-Options-1"> &para;</a></span></h4>
<a class="index-entry-id" id="index-eBPF-Options"></a>

<dl class="table">
<dt><code class="code">-mframe-limit=<var class="var">bytes</var></code></dt>
<dd><p>This specifies the hard limit for frame sizes, in bytes.  Currently,
the value that can be specified should be less than or equal to
&lsquo;<samp class="samp">32767</samp>&rsquo;.  Defaults to whatever limit is imposed by the version of
the Linux kernel targeted.
</p>
</dd>
<dt><a id="index-mkernel-1"></a><span><code class="code">-mkernel=<var class="var">version</var></code><a class="copiable-link" href="#index-mkernel-1"> &para;</a></span></dt>
<dd><p>This specifies the minimum version of the kernel that will run the
compiled program.  GCC uses this version to determine which
instructions to use, what kernel helpers to allow, etc.  Currently,
<var class="var">version</var> can be one of &lsquo;<samp class="samp">4.0</samp>&rsquo;, &lsquo;<samp class="samp">4.1</samp>&rsquo;, &lsquo;<samp class="samp">4.2</samp>&rsquo;,
&lsquo;<samp class="samp">4.3</samp>&rsquo;, &lsquo;<samp class="samp">4.4</samp>&rsquo;, &lsquo;<samp class="samp">4.5</samp>&rsquo;, &lsquo;<samp class="samp">4.6</samp>&rsquo;, &lsquo;<samp class="samp">4.7</samp>&rsquo;,
&lsquo;<samp class="samp">4.8</samp>&rsquo;, &lsquo;<samp class="samp">4.9</samp>&rsquo;, &lsquo;<samp class="samp">4.10</samp>&rsquo;, &lsquo;<samp class="samp">4.11</samp>&rsquo;, &lsquo;<samp class="samp">4.12</samp>&rsquo;,
&lsquo;<samp class="samp">4.13</samp>&rsquo;, &lsquo;<samp class="samp">4.14</samp>&rsquo;, &lsquo;<samp class="samp">4.15</samp>&rsquo;, &lsquo;<samp class="samp">4.16</samp>&rsquo;, &lsquo;<samp class="samp">4.17</samp>&rsquo;,
&lsquo;<samp class="samp">4.18</samp>&rsquo;, &lsquo;<samp class="samp">4.19</samp>&rsquo;, &lsquo;<samp class="samp">4.20</samp>&rsquo;, &lsquo;<samp class="samp">5.0</samp>&rsquo;, &lsquo;<samp class="samp">5.1</samp>&rsquo;,
&lsquo;<samp class="samp">5.2</samp>&rsquo;, &lsquo;<samp class="samp">latest</samp>&rsquo; and &lsquo;<samp class="samp">native</samp>&rsquo;.
</p>
</dd>
<dt><a id="index-mbig_002dendian-5"></a><span><code class="code">-mbig-endian</code><a class="copiable-link" href="#index-mbig_002dendian-5"> &para;</a></span></dt>
<dd><p>Generate code for a big-endian target.
</p>
</dd>
<dt><a id="index-mlittle_002dendian-5"></a><span><code class="code">-mlittle-endian</code><a class="copiable-link" href="#index-mlittle_002dendian-5"> &para;</a></span></dt>
<dd><p>Generate code for a little-endian target.  This is the default.
</p>
</dd>
<dt><a id="index-mjmpext"></a><span><code class="code">-mjmpext</code><a class="copiable-link" href="#index-mjmpext"> &para;</a></span></dt>
<dd><p>Enable generation of extra conditional-branch instructions.
Enabled for CPU v2 and above.
</p>
</dd>
<dt><a id="index-mjmp32"></a><span><code class="code">-mjmp32</code><a class="copiable-link" href="#index-mjmp32"> &para;</a></span></dt>
<dd><p>Enable 32-bit jump instructions. Enabled for CPU v3 and above.
</p>
</dd>
<dt><a id="index-malu32"></a><span><code class="code">-malu32</code><a class="copiable-link" href="#index-malu32"> &para;</a></span></dt>
<dd><p>Enable 32-bit ALU instructions. Enabled for CPU v3 and above.
</p>
</dd>
<dt><a id="index-mcpu-5"></a><span><code class="code">-mcpu=<var class="var">version</var></code><a class="copiable-link" href="#index-mcpu-5"> &para;</a></span></dt>
<dd><p>This specifies which version of the eBPF ISA to target. Newer versions
may not be supported by all kernels. The default is &lsquo;<samp class="samp">v3</samp>&rsquo;.
</p>
<p>Supported values for <var class="var">version</var> are:
</p>
<dl class="table">
<dt>&lsquo;<samp class="samp">v1</samp>&rsquo;</dt>
<dd><p>The first stable eBPF ISA with no special features or extensions.
</p>
</dd>
<dt>&lsquo;<samp class="samp">v2</samp>&rsquo;</dt>
<dd><p>Supports the jump extensions, as in <samp class="option">-mjmpext</samp>.
</p>
</dd>
<dt>&lsquo;<samp class="samp">v3</samp>&rsquo;</dt>
<dd><p>All features of v2, plus:
</p><ul class="itemize mark-minus">
<li>32-bit jump operations, as in <samp class="option">-mjmp32</samp>
</li><li>32-bit ALU operations, as in <samp class="option">-malu32</samp>
</li></ul>

</dd>
</dl>

</dd>
<dt><a id="index-mco_002dre"></a><span><code class="code">-mco-re</code><a class="copiable-link" href="#index-mco_002dre"> &para;</a></span></dt>
<dd><p>Enable BPF Compile Once - Run Everywhere (CO-RE) support. Requires and
is implied by <samp class="option">-gbtf</samp>.
</p>
</dd>
<dt><a id="index-mno_002dco_002dre"></a><span><code class="code">-mno-co-re</code><a class="copiable-link" href="#index-mno_002dco_002dre"> &para;</a></span></dt>
<dd><p>Disable BPF Compile Once - Run Everywhere (CO-RE) support. BPF CO-RE
support is enabled by default when generating BTF debug information for
the BPF target.
</p>
</dd>
<dt><code class="code">-mxbpf</code></dt>
<dd><p>Generate code for an expanded version of BPF, which relaxes some of
the restrictions imposed by the BPF architecture:
</p><ul class="itemize mark-minus">
<li>Save and restore callee-saved registers at function entry and
exit, respectively.
</li></ul>
</dd>
</dl>

</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="FR30-Options.html">FR30 Options</a>, Previous: <a href="DEC-Alpha-Options.html">DEC Alpha Options</a>, Up: <a href="Submodel-Options.html">Machine-Dependent Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
